var fs = require('fs');
var path = require('path');
module.exports = {
	invoke : function(url, data, cb) { 
		var p = path.join(__dirname, '../public/', url);
		p = path.resolve(p, '.');
		var fileText = fs.readFileSync(p, {encoding:'utf-8'});
		//console.log('API.invoke(%s, %s)\r\n%s', url, JSON.stringify(data), fileText);
		cb(fileText);
		return fileText;
	}
} 
